<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 280px;
            background-color: #eee;
            padding: 20px;
            margin:0 auto;
        }
        button{
            margin: 30px 25px;
        }
    </style>
</head>
<body>
    <div>
        <p>商品：Web前端课程</p>
        <p>原价：1980元</p>
        <p>现价：1.98元</p>
        <p>内容：HTML、CSS、JS</p>
        <p>地址：北京市朝阳区</p>
        <p>
            <button>取消</button>
            <button>支付</button>
        </p>
    </div>
    <script>
        // https://jinwen01.ke.qq.com
        // 逻辑：点击支付，出现确认框
        document.getElementsByTagName('button')[1].onclick = function(){
            let res = window.confirm('您确定要支付吗');
            if(res){
                location.href = './succ.html';
            }
        }
    </script>
</body>
</html>